﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Data;

namespace LocalServerApp
{
    [ServiceContract(CallbackContract = typeof(IEndSessionCallback))]
    public interface ILocalServerService
    {
        [OperationContract]
        void endSession();

        [OperationContract]
        bool subscribe();

        [OperationContract]
        bool unsubscribe();

        [OperationContract]
        void startSession();

        [OperationContract]
        bool isInWardrobe(string cpr);

        [OperationContract]
        [FaultContract(typeof(FaultException))]
        int depositClothes(string name, string adress, string zipcode, string cpr, bool? male, string birthdate);

        [OperationContract]
        List<int> getClothesFromPerson(string hashIdentifier);

        [OperationContract]
        void withdrawClothes(int hangerNo);

        [OperationContract]
        List<Person> searchPersonsInWardrobe(string name, string CPR, string adress, string zipcode, string hangerNo);

        [OperationContract]
        Boolean isLicensValid();

        [OperationContract]
        void setLastRemoteConnectionDate(DateTime date);

        [OperationContract]
        DateTime getLastRemoteConnectionDate();

        [OperationContract]
        void setNumberOfHangers(int numberOfHangers);

        [OperationContract]
        int getNumberOfHangers();

        [OperationContract]
        List<Hanger> getForgottenClothes();

        [OperationContract]
        void cancelDepositClothes(int hangerNo);
    }
}
